<template>
  <div>
    <el-descriptions title="我的详细资料" :column="1" border>
      <el-descriptions-item label-align="left" label="用户名">{{userInfo.username}}</el-descriptions-item>
      <el-descriptions-item label-align="left" label="真实姓名">{{userInfo.realname}}</el-descriptions-item>
      <el-descriptions-item label-align="left" label="电话">{{userInfo.phone}}</el-descriptions-item>
      <el-descriptions-item label-align="left" label="最近登录时间">{{userInfo.gmtLastLogin}}</el-descriptions-item>
      <el-descriptions-item label-align="left" label="角色">{{userInfo.roles}}</el-descriptions-item>
      <el-descriptions-item label-align="left" label="状态">
        <el-button :type="userInfo.status==1?'primary':'danger'">{{userInfo.status?'正常':'异常'}}</el-button>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>


<script>
import { mapGetters } from "vuex";

export default {
  computed: {
    ...mapGetters(["userInfo"]),
  },
};
</script>